This invention relates to accessing information in a database.
A database is a body of information that is logically organized so that it can be retrieved, stored and searched in a coherent manner by a "database engine"--a collection of software methods for retrieving or manipulating data in the database. Databases generally fall into three categories: relational databases, object-oriented databases and object-relational databases.
A relational database (RDB) is a collection of fixed-field two-dimensional tables that can be related (or "joined") to each other in virtually any manner a database developer chooses. The structure of a relational database can be modified by selectively redefining the relationships between the tables. A database engine may perform complex searches on a relational database quickly and easily by using any of various database query protocols such as the method expressed by the Structured Query Language (SQL) or by other mechanisms. The relationships between the tables enable results of a search to be automatically cross-referenced to corresponding information in other tables in the database. As shown in FIG. 1, for example, a relational database 100 includes a customer table 102 which is joined by a logical link 103 to an order table 104 which in turn is joined by a logical link 105 to an inventory table 106. A user may query the database 100, for example, for all order numbers higher than a threshold value. Because the order table 104 is joined with the customer table 102 and the inventory table 106, the list of order numbers resulting from the query can be retrieved and displayed along with the respective customer names and inventory items that correspond to the identified order numbers.
An object-oriented database (OODB) is a collection of "objects"--software elements that contain both data and rules for manipulating that data. In contrast to a relational database which can store only character-type data, an OODB can store data of virtually any type (text, 3D graphic images, video clips, etc.). An OODB stores its constituent objects in a hierarchy of classes with associated rules so that the OODB contains much of the logic it needs to do useful work. A relational database in contrast contains only data and must rely on external application software to perform useful functions with the data.
A object-relational database (ORDB) is a hybrid of the other two types. Non-character data (e.g., an image file) may be stored and retrieved in an ORDB as a binary large object (BLOB)--an undifferentiated mass of data. Rules for manipulating the data contained within a BLOB (e.g., a utility for viewing image files) may be stored either within the database or external to it depending on the particular ORDB implementation. The Informix.RTM. Universal Server (IUS.RTM.) is an example of an object-relational database management system (ORDBMS) that internally stores the rules for manipulating BLOBs so that they may be treated as "native" data types--that is, data types that the ORDBMS itself has the capability to manipulate.
Information within a relational or an object-relational database typically is accessed by SQL-compliant computer programs that are written to accomplish a specific function. For example, a user may write a SQL program that retrieves a list of customer names from a database which stores customer information. Alternatively, many different application programs are available that support database queries and which allow a user to interactively formulate a database query by specifying an arbitrary set of criteria (e.g., the names of all out-of-state customers with overdue accounts). This type of application program presents the user's database query to the database engine which retrieves the requested information from the database. Such application programs are referred to as "database aware" because they are have the ability to interact with and manipulate databases.
Most application programs, in contrast, are "database-unaware" meaning that they cannot access information stored in a database. Rather, database-unaware applications rely on file systems, such as the Network File System (NFS) developed by Sun Microsystems, Inc., for storing and retrieving information in discrete files. A database-unaware program stores each separate document in a separate disk file identified by the user of the application. In FIG. 2, for example, a file system 200 has two disk drives mounted: drive 202 which is mapped to the label a: and drive 204 which is mapped to the label b:. Each of the a: and b: drives includes one or more directories (docs on the a: drive 202; dir1 and dir2 on the b: drive 204) which in turn may have subdirectories (subdir1 in dir1; subdir2 and subdir3 in dir2) and so on with virtually any level of hierarchical nesting being possible. Files 206-212 may exist at any of the various directory or subdirectory levels within the file system. The labels a: and b: represent the "namespace" of the file system. That is, all filename paths that begin with a: or b: are within the file system's namespace. As shown in FIG. 2, for example, a document that lists names of out-of-state customers is stored in the file system's namespace at a location defined by the filename path
a:.backslash.docs.backslash.cust.sub.-- outstate.txt PA1 a:.backslash.docs.backslash.cust.sub.-- overdue.txt.
which means that a file 211 named "cust.sub.-- outstate" of the type "txt" is stored in a directory named docs on a disk drive 202 mapped to the label a:. Another document that lists names of customers with overdue accounts is stored in a separate disk file located at the filename path
These two files are separate and distinct entities that are not related or joined in the sense that tables in a database are related.